Password Security

Setting up a password login for switches and routers is a critical security measure. By setting up in network devices can enhance the security and prevent from unauthorized access.

In a Cisco router or switch, there are 2 password should be set up (console and virtual terminal line). This can have an extra security for the devices. Moreover, cisco routers and switches also provide password encryption service, minimum password length and block login setting for extra security.

Password Security

The figure above shows the configuration of password security on a Cisco router. The first password is for the console line, and the second password is for the virtual terminal line when the user enters privileged EXEC mode.


Service Password Encryption

By default, all the passwords configured are store in clear-text. It means that user can view the passwords directly with the command show run.

Before Password Encryption

To overcome this, the clear-text can be encrypted with the command service password-encryption.

After Password Encryption

Configuration of Password Security on Cisco Router

  1. Enable Password Encryption
  2. (config)# service password encryption

  3. Set Password Minimum Length
  4. (config)# security password min-length [number]

  5. Block for Login Failed Attempt
  6. (config)# login block-for [seconds] attempts [number] within [seconds]

  7. Enter into Console/Virtual Line
  8. (config)# line console/vty [start number of line] [end number of line]

  9. Set Password for Line
  10. (config-line)# password [your password]

  11. Set Password for Login
  12. (config-line)# login

  13. Check Configuration
  14. # show run

References